const Koa = require('koa');
const app = new Koa;
//ejs 模板引擎
const ejs = require('ejs');
//pug 模板引擎 前身是jade
const pug = require('pug');
const { normalTpl,ejsTpl,pugTpl } = require('./tpl');
app.use(async (ctx,next)=>{
    ctx.type = 'text/html;charset=utf-8'
    // ctx.body = ejs.render(ejsTpl,{name:'jack',content:'一起看电影呀'});
    ctx.body = pug.render(pugTpl,{name:'jackWu',content:'let us go to movies'})
})

app.listen(4455);